package org.lgiavedoni.android.franq.core.log;

import org.lgiavedoni.android.franq.core.dao.DaoObject;
import org.lgiavedoni.android.franq.service.log.Logger.LogLevel;
import org.lgiavedoni.android.franq.util.date.DateUtil;

public class Log extends DaoObject {

	private final LogLevel logLevel;
	private final String text;

	public Log(LogLevel level, String text) {
		this.logLevel = level;
		this.text = text;
	}

	@Override
	public String toString() {
		return DateUtil.parseDateTime(getCreationDate().getTime()) + " " + logLevel.toString().toUpperCase() + ": " + text;
	}

	public LogLevel getLogLevel() {
		return logLevel;
	}

	public String getText() {
		return text;
	}

}
